<script lang="ts" setup>
import LxEntry from './common/LxEntry.vue'

const pages = [
  { title: '联系人', path: '/contacts', icon: 'contacts' },
  { title: '订单', path: '/orders', icon: 'order' },
  { title: '商品', path: '/materials', icon: 'box' },
  { title: '价格策略', path: '/price_policys', icon: 'price' },
  { title: '人事', path: '/jobs', icon: 'worker' },
  { title: '趋势', path: '/trends', icon: 'combo-chart' },
  { title: '监控', path: '/cctv', icon: 'camera' },
  // { title: '计算', path: '/calculate', icon: 'table' },
]
</script>

<template>
  <div flex flex-wrap>
    <LxEntry
      title="新订单" icon="create-order"
      :action="() => $router.push('/orders/edit?template=0')"
      :grid="5"
    />
    <LxEntry
      title="新事务" icon="calendar-plus"
      :action="() => $router.push('jobs/events/detail?event=1')"
      :grid="5"
    />
    <LxEntry
      v-for="(app, ai) in pages" :key="ai"
      :action="() => $router.push(app.path)"
      :icon="app.icon"
      :title="app.title"
      :grid="5"
    />
  </div>
</template>
